package com.mystudy.management.usermanagement.controller;

import com.mystudy.management.usermanagement.service.LogoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class LogoutController {

    @Autowired
    private LogoutService service;

    //退出登录后转到登录界面
    @RequestMapping("/admin/logout")
    public String logout(){
        service.logout();
        return "redirect:/admin";
    }


}





